.class public Lcom/netease/newsreader/activity/WebViewActivity;
.super Lcom/netease/newsreader/activity/BaseActivity;
.source "WebViewActivity.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 15
    invoke-direct {p0}, Lcom/netease/newsreader/activity/BaseActivity;-><init>()V

    return-void
.end method


# virtual methods
.method public onApplyTheme()V
    .locals 3

    .prologue
    .line 57
    invoke-super {p0}, Lcom/netease/newsreader/activity/BaseActivity;->onApplyTheme()V

    .line 58
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/WebViewActivity;->getThemeSettingsHelper()Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v0

    .line 59
    .local v0, themeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;
    const v1, 0x7f0c0008

    const v2, 0x7f080025

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/app/Activity;II)V

    .line 60
    const v1, 0x7f0c006f

    const v2, 0x7f020089

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setImageViewSrc(Landroid/app/Activity;II)V

    .line 61
    const v1, 0x7f0c0007

    const v2, 0x7f0200fe

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/app/Activity;II)V

    .line 62
    const v1, 0x7f0c0059

    const v2, 0x7f080029

    invoke-virtual {v0, p0, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroudColor(Landroid/app/Activity;II)V

    .line 63
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 8
    .parameter "savedInstanceState"

    .prologue
    const/4 v6, 0x1

    .line 19
    invoke-super {p0, p1}, Lcom/netease/newsreader/activity/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    .line 20
    invoke-virtual {p0, v6}, Lcom/netease/newsreader/activity/WebViewActivity;->requestWindowFeature(I)Z

    .line 22
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/WebViewActivity;->getIntent()Landroid/content/Intent;

    move-result-object v4

    const-string v5, "url"

    invoke-virtual {v4, v5}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 23
    .local v2, url:Ljava/lang/String;
    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 24
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/WebViewActivity;->finish()V

    .line 53
    :goto_0
    return-void

    .line 28
    :cond_0
    const v4, 0x7f03007e

    invoke-virtual {p0, v4}, Lcom/netease/newsreader/activity/WebViewActivity;->setContentView(I)V

    .line 30
    const v4, 0x7f0c0008

    invoke-virtual {p0, v4}, Lcom/netease/newsreader/activity/WebViewActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    .line 31
    .local v1, title:Landroid/widget/TextView;
    invoke-virtual {p0}, Lcom/netease/newsreader/activity/WebViewActivity;->getIntent()Landroid/content/Intent;

    move-result-object v4

    const-string v5, "title"

    invoke-virtual {v4, v5}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 32
    const v4, 0x7f0c018b

    invoke-virtual {p0, v4}, Lcom/netease/newsreader/activity/WebViewActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/webkit/WebView;

    .line 33
    .local v3, webView:Landroid/webkit/WebView;
    invoke-virtual {v3}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v4

    invoke-virtual {v4, v6}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    .line 34
    invoke-static {p0}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 35
    invoke-static {}, Landroid/webkit/WebView;->enablePlatformNotifications()V

    .line 36
    const-string v4, "10.0.0.172"

    const-string v5, ""

    const-string v6, ""

    const-string v7, ""

    invoke-virtual {v3, v4, v5, v6, v7}, Landroid/webkit/WebView;->setHttpAuthUsernamePassword(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 38
    :cond_1
    const v4, 0x7f0c00cd

    invoke-virtual {p0, v4}, Lcom/netease/newsreader/activity/WebViewActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .line 39
    .local v0, loadingView:Landroid/view/View;
    const/16 v4, 0x8

    invoke-virtual {v3, v4}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 40
    const/4 v4, 0x0

    invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V

    .line 41
    new-instance v4, Lcom/netease/newsreader/activity/WebViewActivity$1;

    invoke-direct {v4, p0, v0, v3}, Lcom/netease/newsreader/activity/WebViewActivity$1;-><init>(Lcom/netease/newsreader/activity/WebViewActivity;Landroid/view/View;Landroid/webkit/WebView;)V

    invoke-virtual {v3, v4}, Landroid/webkit/WebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 52
    invoke-virtual {v3, v2}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    goto :goto_0
.end method
